wayland: Commit surface from cairo context
authorJonas Ådahl <jadahl@gmail.com>
Thu, 17 Sep 2020 15:35:35 +0000 (17:35 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 17 Sep 2020 15:35:35 +0000 (17:35 +0200)
commit1abcd6f3043fc272d8fd30437fc0969c73fc6eb5
treedc9fc7a76fdd49bd7119ea55f22ecf9b12819e84
parentf87de393b57fbae0a96b59cb0b53a1f7c4e64d17
wayland: Commit surface from cairo context

In order to make the cairo renderer/context behave more similar to how
the OpenGL and Vulkan renderer/context behaves, request a frame callback
and commit in the end frame vfunc.

This means the end frame vfunc in cairo does

 * attach buffer
 * request frame callback
 * sync surface state
 * commit

Where as e.g. the OpenGL version of the same flow does

 * attach buffer
 * request frame callback
 * sync surface state
 * eglSwapBuffers()

where eglSwapBuffers() indirectly calls wl_surface_commit().
gdk/wayland/gdkcairocontext-wayland.c
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/gdksurface-wayland.c